<template>
  <view class="wrap">
   <top-tab tabTitle="联系客服" @backClick="backClick"  backColor="#5B2177"/>
	 <view class="main">
		 <view class="qq-code" v-for="(item,index) in fromData" :key="index">
			<image :src="item.address" class="img"></image>
			<view class="name">{{item.title}}</view>
		 </view>
	 </view>
  </view>
</template>

<script>
	import topTab from '@/components/top-tabbar.vue'
	import { $POST, $GET } from '@/network/api.js'
  export default {
		components: { topTab },
    data() {
      return {
				fromData: []
			}
    },
  onLoad() {
		this.getCode()
	},
  methods: {
		// 获取二维码
		async getCode() {
			const res = await $GET("/boke-user/user/customer/service") 
			this.fromData = res.data
		},
		// 返回上一页
		backClick() {
			uni.navigateBack({})
		}
	}
}
</script>

<style lang="scss" scoped>
	.main{
		overflow: hidden;
		padding-top: 70rpx;
		.qq-code{
			width: 435rpx;
			height: 454rpx;
			border: 3rpx solid #44C8FF;
			border-radius: 10rpx;
			margin: auto;
			margin-bottom: 55rpx;
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: center;
			.img{
				width: 313rpx;
				height: 313rpx;
			}
			.name{
				margin-top:36rpx;
				font-size: 32rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #279ED0;
			}
		}
	}
</style>
